<?php

class spComboboxList extends spDiv
{
	private $select;

	public function __construct( $data=null )
	{
		parent::__construct( $data );
		parent::setClass( "spComboboxList" );
		
		$this->select = new spSelect;
		parent::addChild( $this->select );
		
		if ( isset($data["items"]) && count($data["items"]) ) 
			$this->addItems( $data["items"] );
	}
	
	public function addItems( $items )
	{
		foreach ( $items as $i )
		{
			$this->select->addChild(
				new spOption( array( "value"=>$i ) )
			);
		}
	}
}

?>